package com.fan.leetcode;

/**
 * 剑指 Offer 52. 两个链表的第一个公共节点
 *
 * @author ZhangFan
 * @since 2021/7/21 下午 8:54
 */
public class QuestionOffer52 {
    class ListNode {
        int val;
        ListNode next;

        ListNode(int x) {
            val = x;
            next = null;
        }
    }

    public ListNode getIntersectionNode(ListNode headA, ListNode headB) {
        if (headA == headB) {
            return headA;
        }
        return null;
    }
}
